﻿<%@ Page Title="" Language="VB" MasterPageFile="~/admin/admin.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="admin_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" Runat="Server">
    <asp:LoginView ID="LoginView1" runat="server">
                    <AnonymousTemplate>
                        <asp:Login ID="Login1" runat="server" CreateUserText="Request Admin Login" 
                            PasswordRecoveryText="Recover password" 
                            PasswordRecoveryUrl="~/account/recover-password.aspx" LoginButtonText="Sign In" 
                            LoginButtonType="Link" TitleText="" UserNameLabelText="Email" 
                            DestinationPageUrl="~/admin/Default.aspx" onloginerror="Login1_LoginError">
                            <LayoutTemplate>
                                <asp:Panel ID="Panel1" runat="server" Visible="False">                                
                                <div  class="alert alert-error">
                                    <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                </div>
                                </asp:Panel>
                                <div class="control-group">
                                    <label class="control-label" for="inputEmail">
                                        Username</label>
                                    <div class="controls">
                                        <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                            ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="ctl00$ctl02$Login1">*</asp:RequiredFieldValidator>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="inputPassword">
                                        Password</label>
                                    <div class="controls">
                                        <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                            ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="ctl00$ctl02$Login1">*</asp:RequiredFieldValidator>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <div class="controls">
                                        <label class="checkbox">
                                            <asp:CheckBox ID="RememberMe" runat="server" Text="Remember me next time." />
                                        </label>
                                        <asp:LinkButton ID="LoginLinkButton" runat="server" CommandName="Login" ValidationGroup="ctl00$ctl02$Login1"
                                            CssClass="btn">Sign In</asp:LinkButton>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <div class="controls">
                                        <%--<asp:HyperLink ID="CreateUserLink" runat="server" NavigateUrl="~/account/create-user.aspx">Request Admin Login</asp:HyperLink>--%>
                                        <br />
                                        <asp:HyperLink ID="PasswordRecoveryLink" runat="server" NavigateUrl="~/account/recover-password.aspx">Recover password</asp:HyperLink>
                                    </div>
                                </div>
                            </LayoutTemplate>
                        </asp:Login>
                    </AnonymousTemplate>
                    <LoggedInTemplate>
                        <div class="page-header">
                            <h1>Dashboard <small>
                                <asp:Label ID="uniLabel" runat="server" Text="Label"></asp:Label></small></h1>
                        </div>                
                        <div class="row">
                            <div class="span4 well">
                                <h1>
                                    <asp:Label ID="membersLabel" runat="server" Text="Label"></asp:Label></h1>
                                     <p class="lead">Registered Members</p>
                                <asp:HyperLink ID="HyperLink2" runat="server" CssClass="btn btn-info" NavigateUrl="~/admin/members/members.aspx">View</asp:HyperLink>
                            </div>
                            <asp:LoginView ID="LoginView2" runat="server">
                                <RoleGroups>
                                    <asp:RoleGroup Roles="Role_Super_Admin">
                                        <ContentTemplate>
                                            <div class="span4 well">
                                                <h1>
                                                    <asp:Label ID="adminLabel" runat="server" Text="0"></asp:Label>
                                                    </h1>
                                                <p class="lead">Admin Resquests</p>
                                                <asp:HyperLink ID="HyperLink1" runat="server" CssClass="btn btn-info" NavigateUrl="~/admin/admins/requests.aspx">View</asp:HyperLink>
                                            </div>
                                        </ContentTemplate>
                                    </asp:RoleGroup>
                                </RoleGroups>
                            </asp:LoginView>                         
                        </div>        
                    </LoggedInTemplate>
                    
                </asp:LoginView>
</asp:Content>

